<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>老师管理</title>
    <link rel="stylesheet" href="javascript/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="/door/backend/css/mgr_teacher.css">
    <script type="text/javascript" src="/door/backend/javascript/jquery.min.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/bootstrap.min.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/dropdown.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/modal.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/alert.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/jquery-form.js"></script>
    <script src="/door/backend/javascript/bootstrap/js/jquery.validate.min.js"></script>
    <script src="/door/backend/javascript/pagejs/common_modal.js"></script>
    <script src="/door/backend/javascript/pagejs/mgr_teacher.js"></script>
	<script src="/door/js/pagination.js"></script>
	<script src="javascript/layer/layer.js"text/javascript" charset="utf-8"></script>
</head>
<!--老师管理-->
<body>
<div id="header">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="mgr_teacher.html">老师管理</a>
                <a class="navbar-brand" style="font-size: 18px">
                	<span onclick="editTeacher('add')" class="glyphicon glyphicon-plus-sign" title="新增老师"></span>
                </a>
                <a class="navbar-brand" style="font-size: 18px">
                	<span onclick="showMyAlert()" class="glyphicon glyphicon-trash" title="删除老师" data-dismiss="alert"></span>
                </a>
                <a class="navbar-brand"><span class="glyphicon glyphicon-log-in" title="导入老师信息列表"
                                              onclick="importList()"></span></a>
                <a class="navbar-brand" href="/door/doc/template/TeacherTemp.xls">
                	<span class="glyphicon glyphicon-download-alt" title="下载老师信息模板"></span></a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <form class="navbar-form navbar-left" role="search">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="请输入姓名或编号" id="search">
                    </div>
                    <button type="button" class="btn btn-default" onclick="criteria()">搜索</button>
                </form>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#">广州xxx大学</a></li>
                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
</div>
<div id="content">
    <div class="panel panel-default">
        <div class="panel-body">
            <table class="table table-bordered text-center table-condensed table-hover" >
                <thead>
                <th>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" id="selectAll" value="selectAll"> 全选
                        </label>
                    </div>
                </th>
                <th>教师编号</th>
                <th>教师姓名</th>
                <th>账号</th>
                <th>联系方式</th>
                <!-- <th>微信号</th> -->
                <th>最后修改时间</th>
                <th>修改人</th>
                <th>操作</th>
                </thead>
                <tbody id="teacher_body">
                </tbody>
            </table>
        </div>
        <div class="panel-footer text-center">
            <nav>
                <!-- <ul class="pagination">
                    <li><a href="#">&laquo;</a></li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li><a href="#">&raquo;</a></li>
                    <span style="line-height: 34px">共<strong id="pageCount">10</strong>页</span>
                </ul> -->
                <ul class="pagination">
	               <!--  <li class="cursor"><span>首页</span></li>
	                <li class="cursor"><span>&laquo;</span></li> -->
	                
	                <li><a href="#" >&laquo;</a></li>
	                <li><a href="#">1</a></li>
	                <li><a href="#">2</a></li>
	                <li><a href="#">3</a></li>
	                <li><a href="#">4</a></li>
	                <li><a href="#">5</a></li>
	                <li><a href="#" >&raquo;</a></li>
	                <!-- <li class="cursor"><span>&raquo;</span></li>
	                <li class="cursor"><span>末页</span></li> -->
	            	<span  class="cursor" style="line-height: 34px">共<strong id="pageCount">10</strong>页</span>
	            </ul>
            </nav>
        </div>
    </div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header"><h4 class="modal-title" id="myModalLabel">老师添加</h4></div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-6">
                        <div class="input-group">
                          	<span class="input-group-btn"><button class="btn btn-default" type="button">姓名：</button></span>
                            <input type="text" class="form-control" id="teachername">
                            <input type="hidden" id="tid">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                    <div class="col-md-6">
                        <div class="input-group">
                          	<span class="input-group-btn"><button class="btn btn-default" type="button">手机：</button></span>
                            <input type="text" class="form-control" id="teacherphone">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                </div>
                <div class="row ma_top">
                	<!-- 
                    <div class="col-md-6">
                        <div class="input-group">
                          	<span class="input-group-btn"><button class="btn btn-default" type="button">密码：</button></span>
                            <input type="password" class="form-control" id="teacherpassword">
                        </div>/input-group
                    </div>
                     -->
                        <div class="col-md-6 accountInfo"  style="display:none;">
                        <div class="input-group">
                          	<span class="input-group-btn"><button class="btn btn-default" type="button">账号：</button></span>
                            <input type="text" class="form-control" id="teacheraccount" placeholder="荐：姓的全拼+名的首字母">
                        </div>
                        
                        
                    </div>
                    <div class="col-md-6">
                        <div class="input-group">
                          	<span class="input-group-btn"><button class="btn btn-default" type="button">老师编号：</button></span>
                            <input type="text" class="form-control" id="teachercode" placeholder="默认作为初始密码！">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                </div>
            </div>
            <div class="modal-footer">
                <span id="information" style="color: red"></span>
                <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary ok" onclick="addteacher()">确认</button>
            </div>
        </div>
    </div>
</div>


<!-- Modal2 -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <!--<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span>-->
                <!--<span class="sr-only">Close</span>-->
                <!--</button>-->
                <h4 class="modal-title" id="myModalLabel2">教师密码修改</h4>
            </div>
            <div class="modal-body" id="addModel2">
                <div class="row ma_top">
                    <div class="col-md-8 col-md-offset-2">
                        <div class="input-group">
                          <span class="input-group-btn">
                            <button class="btn btn-default" type="button">教师账号：</button>
                          </span>
                            <input type="text" class="form-control" id="account">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                </div>
                <div class="row ma_top">
                    <div class="col-md-8 col-md-offset-2">
                        <div class="input-group">
                          <span class="input-group-btn">
                            <button class="btn btn-default" type="button">姓名：</button>
                          </span>
                            <input type="text" class="form-control" id="name2">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                </div>
                <div class="row ma_top">
                    <div class="col-md-8 col-md-offset-2">
                        <div class="input-group">
                          <span class="input-group-btn">
                            <button class="btn btn-default" type="button">修改密码：</button>
                          </span>
                            <input type="password" class="form-control" id="password">
                        </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="addCance2" onclick="upadteTeaPassWord()">确认修改</button>
            </div>
        </div>
    </div>
</div>













<!--删除提醒-->
<div id="delete_alert" style=" position: absolute;width: 28%;left:30%;top:120px;">
    <div class="alert alert-info alert-dismissible fade in" role="alert">
        <!--<button type="button" class="close" data-dismiss="alert">-->
        <!--<span aria-hidden="true">×</span><span-->
        <!--class="sr-only">Close</span></button>-->
        <h4>提示</h4>
        <p >确认删除所选老师？</p>
        <p>
            <button type="button" class="btn btn-primary btn-sm cancel" onclick="delectselect()">删除</button>
            <button type="button" class="btn btn-default btn-sm ok" onclick="hideAlert()">取消</button>
        </p>
    </div>
</div>
<!--导入-->
<form id="uploadimg-form" action="/door/teacher/upload" method="post">
	<div class="alert alert-info alert-dismissible fade in alert_custom_common alert_custom" role="alert" id="import">
	    <button type="button" class="close" onclick="importHide()"><span>×</span></button>
	    <h4 class="tag_title">老师信息导入</h4>
	    <br>
	    <input type="file" title="选择文件" name="fileUpload" id="fileUpload"  oniput="hasFile()"/>
	    <br>
	    <p>
	        <input id="fileBtn" type="submit" class="btn"  value="确认导入"/><br /><br />
	    </p>
	</div>
</form>
</body>
</html>